home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / language / asxsrc.arc / Z80PST.C < prev   
C/C++ Source or Header  |  1989-08-25  |  4KB  |  153 lines

  1. /* z80pst.c */
  2.  
  3. /*
  4.  * (C) Copyright 1989
  5.  * All Rights Reserved
  6.  *
  7.  * Alan R. Baldwin
  8.  * 721 Berkeley St.
  9.  * Kent, Ohio  44240
  10.  */
  11.  
  12. #include <stdio.h>
  13. #include <setjmp.h>
  14. #include "asm.h"
  15. #include "z80.h"
  16.  
  17. struct    mne    mne[] = {
  18.  
  19.     /* machine */
  20.  
  21.     /* system */
  22.  
  23.     NULL,    "CON",        S_ATYP,        0,    A_CON,
  24.     NULL,    "OVR",        S_ATYP,        0,    A_OVR,
  25.     NULL,    "REL",        S_ATYP,        0,    A_REL,
  26.     NULL,    "ABS",        S_ATYP,        0,    A_ABS|A_OVR,
  27.  
  28.     NULL,    ".byte",    S_BYTE,        0,    0,
  29.     NULL,    ".db",        S_BYTE,        0,    0,
  30.     NULL,    ".word",    S_WORD,        0,    0,
  31.     NULL,    ".dw",        S_WORD,        0,    0,
  32.     NULL,    ".ascii",    S_ASCII,    0,    0,
  33.     NULL,    ".asciz",    S_ASCIZ,    0,    0,
  34.     NULL,    ".blkb",    S_BLK,        0,    1,
  35.     NULL,    ".ds",        S_BLK,        0,    1,
  36.     NULL,    ".blkw",    S_BLK,        0,    2,
  37.     NULL,    ".page",    S_PAGE,        0,    0,
  38.     NULL,    ".title",    S_TITLE,    0,    0,
  39.     NULL,    ".sbttl",    S_SBTL,        0,    0,
  40.     NULL,    ".globl",    S_GLOBL,    0,    0,
  41.     NULL,    ".area",    S_DAREA,    0,    0,
  42.     NULL,    ".even",    S_EVEN,        0,    0,
  43.     NULL,    ".odd",        S_ODD,        0,    0,
  44.     NULL,    ".if",        S_IF,        0,    0,
  45.     NULL,    ".else",    S_ELSE,        0,    0,
  46.     NULL,    ".endif",    S_ENDIF,    0,    0,
  47.     NULL,    ".include",    S_INCL,        0,    0,
  48.     NULL,    ".radix",    S_RADIX,    0,    0,
  49.     NULL,    ".org",        S_ORG,        0,    0,
  50.     NULL,    ".module",    S_MODUL,    0,    0,
  51.  
  52.     /* z80 / hd64180 */
  53.  
  54.     NULL,    "ld",        S_LD,        0,    0x40,
  55.  
  56.     NULL,    "call",        S_CALL,        0,    0xC4,
  57.     NULL,    "jp",        S_JP,        0,    0xC2,
  58.     NULL,    "jr",        S_JR,        0,    0x18,
  59.     NULL,    "djnz",        S_DJNZ,        0,    0x10,
  60.     NULL,    "ret",        S_RET,        0,    0xC0,
  61.  
  62.     NULL,    "bit",        S_BIT,        0,    0x40,
  63.     NULL,    "res",        S_BIT,        0,    0x80,
  64.     NULL,    "set",        S_BIT,        0,    0xC0,
  65.  
  66.     NULL,    "inc",        S_INC,        0,    0x04,
  67.     NULL,    "dec",        S_DEC,        0,    0x05,
  68.  
  69.     NULL,    "add",        S_ADD,        0,    0x80,
  70.     NULL,    "adc",        S_ADC,        0,    0x88,
  71.     NULL,    "sub",        S_SUB,        0,    0x90,
  72.     NULL,    "sbc",        S_SBC,        0,    0x98,
  73.  
  74.     NULL,    "and",        S_AND,        0,    0xA0,
  75.     NULL,    "cp",        S_AND,        0,    0xB8,
  76.     NULL,    "or",        S_AND,        0,    0xB0,
  77.     NULL,    "xor",        S_AND,        0,    0xA8,
  78.  
  79.     NULL,    "ex",        S_EX,        0,    0xE3,
  80.  
  81.     NULL,    "push",        S_PUSH,        0,    0xC5,
  82.     NULL,    "pop",        S_PUSH,        0,    0xC1,
  83.  
  84.     NULL,    "in",        S_IN,        0,    0xDB,
  85.     NULL,    "out",        S_OUT,        0,    0xD3,
  86.  
  87.     NULL,    "rl",        S_RL,        0,    0x10,
  88.     NULL,    "rlc",        S_RL,        0,    0x00,
  89.     NULL,    "rr",        S_RL,        0,    0x18,
  90.     NULL,    "rrc",        S_RL,        0,    0x08,
  91.     NULL,    "sla",        S_RL,        0,    0x20,
  92.     NULL,    "sra",        S_RL,        0,    0x28,
  93.     NULL,    "srl",        S_RL,        0,    0x38,
  94.  
  95.     NULL,    "rst",        S_RST,        0,    0xC7,
  96.  
  97.     NULL,    "im",        S_IM,        0,    0xED,
  98.  
  99.     NULL,    "ccf",        S_INH1,        0,    0x3F,
  100.     NULL,    "cpl",        S_INH1,        0,    0x2F,
  101.     NULL,    "daa",        S_INH1,        0,    0x27,
  102.     NULL,    "di",        S_INH1,        0,    0xF3,
  103.     NULL,    "ei",        S_INH1,        0,    0xFB,
  104.     NULL,    "exx",        S_INH1,        0,    0xD9,
  105.     NULL,    "nop",        S_INH1,        0,    0x00,
  106.     NULL,    "halt",        S_INH1,        0,    0x76,
  107.     NULL,    "rla",        S_INH1,        0,    0x17,
  108.     NULL,    "rlca",        S_INH1,        0,    0x07,
  109.     NULL,    "rra",        S_INH1,        0,    0x1F,
  110.     NULL,    "rrca",        S_INH1,        0,    0x0F,
  111.     NULL,    "scf",        S_INH1,        0,    0x37,
  112.  
  113.     NULL,    "cpd",        S_INH2,        0,    0xA9,
  114.     NULL,    "cpdr",        S_INH2,        0,    0xB9,
  115.     NULL,    "cpi",        S_INH2,        0,    0xA1,
  116.     NULL,    "cpir",        S_INH2,        0,    0xB1,
  117.     NULL,    "ind",        S_INH2,        0,    0xAA,
  118.     NULL,    "indr",        S_INH2,        0,    0xBA,
  119.     NULL,    "ini",        S_INH2,        0,    0xA2,
  120.     NULL,    "inir",        S_INH2,        0,    0xB2,
  121.     NULL,    "ldd",        S_INH2,        0,    0xA8,
  122.     NULL,    "lddr",        S_INH2,        0,    0xB8,
  123.     NULL,    "ldi",        S_INH2,        0,    0xA0,
  124.     NULL,    "ldir",        S_INH2,        0,    0xB0,
  125.     NULL,    "neg",        S_INH2,        0,    0x44,
  126.     NULL,    "otdr",        S_INH2,        0,    0xBB,
  127.     NULL,    "otir",        S_INH2,        0,    0xB3,
  128.     NULL,    "outd",        S_INH2,        0,    0xAB,
  129.     NULL,    "outi",        S_INH2,        0,    0xA3,
  130.     NULL,    "reti",        S_INH2,        0,    0x4D,
  131.     NULL,    "retn",        S_INH2,        0,    0x45,
  132.     NULL,    "rld",        S_INH2,        0,    0x6F,
  133.     NULL,    "rrd",        S_INH2,        0,    0x67,
  134.  
  135.     /* 64180 */
  136.  
  137.     NULL,    ".hd64",    X_HD64,        0,    0,
  138.  
  139.     NULL,    "otdm",        X_INH2,        0,    0x8B,
  140.     NULL,    "otdmr",    X_INH2,        0,    0x9B,
  141.     NULL,    "otim",        X_INH2,        0,    0x83,
  142.     NULL,    "otimr",    X_INH2,        0,    0x93,
  143.     NULL,    "slp",        X_INH2,        0,    0x76,
  144.  
  145.     NULL,    "in0",        X_IN,        0,    0x00,
  146.     NULL,    "out0",        X_OUT,        0,    0x01,
  147.  
  148.     NULL,    "mlt",        X_MLT,        0,    0x4C,
  149.  
  150.     NULL,    "tst",        X_TST,        0,    0x04,
  151.     NULL,    "tstio",    X_TSTIO,    S_END,    0x74
  152. };
  153.